<!--
*@Author: QWP
*@Description: 数据导入弹窗
*@Date: 2024-07-09 16:33:25
-->
<template>
  <u-dialog v-bind="$attrs"
    :width="$attrs['width'] || '40%'"
    :title="$attrs['title'] || '导入'"
    @submit="submit">
    <!-- @close="dialogClose" -->
    <a-upload-dragger
      v-model:fileList="fileList"
      name="file"
      :multiple="true"
      action="#"
      class="u-custome-imp-data"
      @change="handleChange"
      @drop="handleDrop"
    >
    <p class="ant-upload-drag-icon">
      <u-icon-font type="icon-piliangdaoruwenjian" style="color: #aaa"></u-icon-font>
    </p>
    <p class="u-upload-text f-font-size14">可直接将文件拖拽到此处进行上传(支持格式：.xls、xlsx)</p>
  </a-upload-dragger>
  <a-row class="f-padding-t10" 
    style="color:#1890FF;">
    <DownloadOutlined />
    下载导入模版表格
  </a-row>
  </u-dialog>
</template>

<script lang='ts' setup>
import { ref, reactive, computed, onMounted } from 'vue' 
import { useRoute, useRouter } from 'vue-router'
import { InboxOutlined } from '@ant-design/icons-vue';
defineOptions({
  name: 'u-imp-data'
})

interface Props {
  showDownload?: boolean
}
const props = defineProps<Props>()

const emits = defineEmits(['submit']);

// 提交保存
const submit = () => {
  emits('submit')
}

</script>

<style lang='scss'>
.u-custome-imp-data {
  .ant-upload {
    height: 250px
  }
  .u-upload-text {
    font-family: PingFang SC Regular, PingFang SC Regular;
    font-weight: 400;
    color: #999999;
    line-height: 22px;
  }
}
</style>